<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>购物车</title>
  <link rel="stylesheet" href="./css/common.css" />
  <link rel="stylesheet" href="./css/cart.css" />
</head>

<body>
  <div class="container">
    <div class="header">
      <div class="lt"></div>
      <div class="ct">购物车</div>
      <div class="rt"></div>
    </div>
    <!-- 特性描述 -->
    <div class="service-policy">
      <div class="item">30天无忧退货</div>
      <div class="item">48小时快速退款</div>
      <div class="item">满88元免邮费</div>
    </div>
    <!-- 购物车无数据 -->
    <!-- <div class="no-cart" >
        <div class="c">
          <img src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/noCart-a8fe3f12e5.png" />
          <span>去添加点什么吧</span>
        </div>
      </div> -->
    <!-- 购物车有数据 -->
    <div class="cart-view">
      <div class="list">
        <div class="group-item">
          <div class="goods">
            <!-- 正常状态效果 -->
            <div class="item" id="normal">
              <!-- +++++ -->
            </div>
            <!-- 修改状态下效果 -->
            <div class="item edit" style="display: none;">
              <!-- ++++ -->
            </div>
          </div>
        </div>
      </div>
      <div class="cart-bottom">

      </div>
      <!-- 底部TabBar区域 -->
      <div class="tab-bar">
        <a href="index.html">
          <img src="./static/images/ic_menu_choice_nor.png" alt="" />
          <!-- <img src="./static/images/ic_menu_choice_pressed.png" alt=""> -->
          <span>首页</span>
        </a>
        <a href="topic.html">
          <img src="./static/images/ic_menu_topic_nor.png" alt="" />
          <!-- <img src="./static/images/ic_menu_topic_pressed.png" alt=""> -->
          <span>专题</span>
        </a>
        <a href="cate.html">
          <img src="./static/images/ic_menu_sort_nor.png" alt="">
          <!-- <img src="./static/images/ic_menu_sort_pressed.png" alt="" /> -->
          <span>分类</span>
        </a>
        <a href="cart.html" class="active">
          <!-- <img src="./static/images/ic_menu_shoping_nor.png" alt="" /> -->
          <img src="./static/images/ic_menu_shoping_pressed.png" alt="">
          <span>购物车</span>
        </a>
        <a href="user.html">
          <img src="./static/images/ic_menu_me_nor.png" alt="" />
          <!-- <img src="./static/images/ic_menu_me_pressed.png" alt=""> -->
          <span>我的</span>
        </a>
      </div>
    </div>
    <script type="text/html" id="g-item">
      {{each cartList}}
      <div class="checkbox checked a-checkbox" data-isChecked={{$value.checked}}  data-productIds={{$value.product_id}}></div>
      <div class="cart-goods">
        <img class="img" src="{{$value.list_pic_url}}" />
        <div class="info">
          <div class="t">
            <span class="name">{{$value.goods_name}}</span>
            <span class="num">x{{$value.number}}</span>
          </div>
          <div class="attr">{{$value.goods_specifition_name_value}}</div>
          <div class="b">
            <span class="price">￥{{$value.market_price}}</span>
            <!-- <div class="selnum">
												<div class="cut">-</div>
												<input
													value="1"
													class="number"
													disabled="true"
													type="number"
												/>
												<div class="add">+</div>
											</div> -->
          </div>
        </div>
      </div>
      {{/each}}
    </script>
    <script type="text/html" id="g-cart">
      <div class="checkbox checked checkAll ">全选({{cartTotal.checkedGoodsCount}})</div>
          <div class="total">￥{{cartTotal.checkedGoodsAmount}}</div>
          <div class="delete d-del" bindtap="editCart">编辑</div>
          <div class="delete c-del" bindtap="editCart" style="display: none;">完成</div>
          <!-- <div class="checkout">删除所选</div> -->
          <div class="checkout a-xiadan" >
            <a href="checkout.html" style="display: block">下单 </a>
          </div>
          <div class="checkout a-delete" style="display: none;">
            <a href="javascript:;" style="display: block">删除所选 </a>
          </div>
          <!-- 下单按钮点击之后，点击跳转到 shopping下的checkout页面！ -->
        </div>
    </script>
    <script type="text/html" id="g-edit">
		{{each cartList}}
     <div class="checkbox checked a-checkbox" data-isChecked={{$value.checked}}  data-productIds={{$value.product_id}}></div>
                <div class="cart-goods" data-goodsId ={{$value.goods_id}} data-productIds={{$value.product_id}}>
                  <img class="img" src="{{$value.list_pic_url}}" />
                  <div class="info">
                    <div class="t">
                      <span class="name">{{$value.goods_name}}</span>
                      <!-- <span class="num">x{{$value.number}}</span> -->
                    </div>
                    <div class="attr">已选择：{{$value.goods_specifition_name_value}}</div>
                    <div class="b">
                      <span class="price">￥{{$value.market_price}}</span>
                      <div class="selnum">
                        <div class="cut">-</div>
                        <input
                          value="{{$value.number}}"
                          class="number"
                          disabled="true"
                          type="number"
                        />
                        <div class="add">+</div>
                      </div>
                    </div>
                  </div>
                </div>
				{{/each}}
    </script>

    <script src="./js/jquery.js"></script>
    <script src="./js/baseAPI.js"></script>
    <script src="./js/layui/layui.all.js"></script>
    <script src="./js/template-web.js"></script>
    <script src="./js/cart.js"></script>
</body>

</html>